Fix the current directory of the Emacs process on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Fri, 29 Jun 2012 13:11:54 +0000 (16:11 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 29 Jun 2012 13:11:54 +0000 (16:11 +0300)
commitf11acf1825082703c1d62ddc780d5bc0cb36d7a3
treeb5724b638cbe2ab9524ae342348e9d2b502162ef
parentc7b99e7b3056d17013853dfd99e103783892bf30
Fix the current directory of the Emacs process on MS-Windows.

 src/w32.c (getwd): Adjust commentary about startup_dir.
 (init_environment): Always call sys_access, even in non-MSVC
 builds.  Don't chdir to the directory of the Emacs executable.
 This undoes code from 1997 which was justified by the need to
 "avoid conflicts when removing and renaming directories".  But its
 downside was that every relative file name was being interpreted
 relative to the directory of the Emacs executable, which can never
 be TRT.  In particular, it broke sys_access when called with
 relative file names.
 (sys_access): Map GetLastError to errno.
src/ChangeLog
src/w32.c